package com.cictec.middleware;

import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

import com.cictec.middleware.core.InitDataService;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@MapperScan(basePackages = "com.cictec.middleware.core.mapper")
public class MiddlewareDCApplication {

	public static Logger logger = LoggerFactory.getLogger(MiddlewareDCApplication.class);
	
	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(MiddlewareDCApplication.class, args);
		
		InitDataService initDataService= (InitDataService) context.getBean("initDataService");
		initDataService.loadData();
		logger.debug("【middleware-dc】服务启动成功");
	}
}
